/*
 * GuiSobre.java
 *
 * Created on 12/08/2009, 20:46:41
 */
package bil.gui;

import bil.Config;
import java.util.*;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Eduardo Folly
 */
public class GuiSobre extends javax.swing.JInternalFrame {

    public GuiSobre() {
        initComponents();

        Vector linhas = new Vector();
        Vector colunas = new Vector();
        colunas.addElement("Propriedade");
        colunas.addElement("Valor");
        Properties teste = System.getProperties();
        for (Enumeration e = teste.propertyNames(); e.hasMoreElements();) {
            String propri = e.nextElement().toString();
            Vector lin = new Vector();
            lin.addElement(propri);
            lin.addElement(System.getProperty(propri));
            linhas.addElement(lin);
        }
        tabelPropriedades.setModel(new DefaultTableModel(linhas, colunas));

        Config.getDesktop().add(this);

        this.setVisible(true);

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        labelDesenv = new javax.swing.JLabel();
        labelVersao = new javax.swing.JLabel();
        labelNome = new javax.swing.JLabel();
        botaoFechar = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tabelPropriedades = new javax.swing.JTable();

        setClosable(true);
        setTitle("Sobre");
        setPreferredSize(new java.awt.Dimension(600, 320));
        getContentPane().setLayout(new java.awt.GridBagLayout());

        labelDesenv.setFont(new java.awt.Font("Arial", 1, 18));
        labelDesenv.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelDesenv.setText("http://www.oslunaticos.com.br");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
        getContentPane().add(labelDesenv, gridBagConstraints);

        labelVersao.setFont(new java.awt.Font("Arial", 0, 18));
        labelVersao.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelVersao.setText("Versão 0.0.5");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
        getContentPane().add(labelVersao, gridBagConstraints);

        labelNome.setFont(new java.awt.Font("Arial", 1, 32));
        labelNome.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelNome.setText("Baixador de Imagens dos Lunáticos");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 0);
        getContentPane().add(labelNome, gridBagConstraints);

        botaoFechar.setText("Fechar");
        botaoFechar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoFecharActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;
        gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
        getContentPane().add(botaoFechar, gridBagConstraints);

        jScrollPane1.setPreferredSize(new java.awt.Dimension(300, 200));

        tabelPropriedades.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tabelPropriedades.setPreferredSize(new java.awt.Dimension(150, 64));
        jScrollPane1.setViewportView(tabelPropriedades);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
        getContentPane().add(jScrollPane1, gridBagConstraints);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-617)/2, (screenSize.height-434)/2, 617, 434);
    }// </editor-fold>//GEN-END:initComponents

    private void botaoFecharActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoFecharActionPerformed
        this.dispose();
}//GEN-LAST:event_botaoFecharActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botaoFechar;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel labelDesenv;
    private javax.swing.JLabel labelNome;
    private javax.swing.JLabel labelVersao;
    private javax.swing.JTable tabelPropriedades;
    // End of variables declaration//GEN-END:variables
}
